﻿package org.laoda.fckeditor.util;
import java.util.Calendar;

public class Date {

	private Calendar NOW = Calendar.getInstance();

	private  int YEAR = NOW.get(Calendar.YEAR);

	private  int MONTH = NOW.get(Calendar.MONTH) + 1;

	private  int DAY = NOW.get(Calendar.DAY_OF_MONTH);

	private int WEEK = NOW.get(Calendar.DAY_OF_WEEK);

	private  int HOUR = NOW.get(Calendar.HOUR_OF_DAY);

	private int MINUTE = NOW.get(Calendar.MINUTE);

	private int SECOND = NOW.get(Calendar.SECOND);

	//
	public  String getDate() {
		return YEAR + "-" + MONTH + "-" + DAY;
	}

	public  String getDateOfNum() {
		String y = YEAR + "";
		String m = MONTH + "";
		String d = DAY + "";
		if (MONTH < 10)
			m = "0" + MONTH;
		if (DAY < 10)
			d = "0" + DAY;
		System.out.println(y + m + d + HOUR + MINUTE + SECOND);
		return y + m + d + HOUR + MINUTE + SECOND;
	}

	public  String getDateOfShow() {
		
		return YEAR + "年" + MONTH + "月" + DAY + "日";
	}

	public  String getDayOfWeek() {
		String dayOfWeek = "";
		switch (WEEK) {
		case 1:
			dayOfWeek = "星期日";
			break;
		case 2:
			dayOfWeek = "星期一";
			break;
		case 3:
			dayOfWeek = "星期二";
			break;
		case 4:
			dayOfWeek = "星期三";
			break;
		case 5:
			dayOfWeek = "星期四";
			break;
		case 6:
			dayOfWeek = "星期五";
		case 7:
			dayOfWeek = "星期六";
			break;
		}
		return dayOfWeek;
	}

	public  String getTime() {
		return HOUR + ":" + MINUTE + ":" + SECOND;
	}

	
	public  int getYEAR() {
		return YEAR;
	}

	public  int getDAY() {
		return DAY;
	}

	public  int getMONTH() {
		return MONTH;
	}
}
